package com.smallstep.hystrix.entity;

import java.lang.reflect.Method;
import java.util.List;

/**
 * @author 李俊
 */
public class FFFallbackMethod {
    private String service;
    private List<FFPathPattern> pathPatterns;
    private boolean responseTypeSensitive;
    private int priority;
    private Object bean;
    private Method method;

    private boolean circuitBreakerEnabled ;

    private int circuitBreakerErrorThresholdPercentage;

    private int circuitBreakerRequestVolumeThreshold;

    private int circuitBreakerSleepWindowInMilliseconds;

    public FFFallbackMethod() {
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }

    public List<FFPathPattern> getPathPatterns() {
        return pathPatterns;
    }

    public void setPathPatterns(List<FFPathPattern> pathPatterns) {
        this.pathPatterns = pathPatterns;
    }

    public boolean isResponseTypeSensitive() {
        return responseTypeSensitive;
    }

    public void setResponseTypeSensitive(boolean responseTypeSensitive) {
        this.responseTypeSensitive = responseTypeSensitive;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public Object getBean() {
        return bean;
    }

    public void setBean(Object bean) {
        this.bean = bean;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public boolean isCircuitBreakerEnabled() {
        return circuitBreakerEnabled;
    }

    public void setCircuitBreakerEnabled(boolean circuitBreakerEnabled) {
        this.circuitBreakerEnabled = circuitBreakerEnabled;
    }

    public int getCircuitBreakerErrorThresholdPercentage() {
        return circuitBreakerErrorThresholdPercentage;
    }

    public void setCircuitBreakerErrorThresholdPercentage(int circuitBreakerErrorThresholdPercentage) {
        this.circuitBreakerErrorThresholdPercentage = circuitBreakerErrorThresholdPercentage;
    }

    public int getCircuitBreakerRequestVolumeThreshold() {
        return circuitBreakerRequestVolumeThreshold;
    }

    public void setCircuitBreakerRequestVolumeThreshold(int circuitBreakerRequestVolumeThreshold) {
        this.circuitBreakerRequestVolumeThreshold = circuitBreakerRequestVolumeThreshold;
    }

    public int getCircuitBreakerSleepWindowInMilliseconds() {
        return circuitBreakerSleepWindowInMilliseconds;
    }

    public void setCircuitBreakerSleepWindowInMilliseconds(int circuitBreakerSleepWindowInMilliseconds) {
        this.circuitBreakerSleepWindowInMilliseconds = circuitBreakerSleepWindowInMilliseconds;
    }
}
